package com.grad.why.studentsystem.mapper;

import com.grad.why.studentsystem.domain.Course;
import com.grad.why.studentsystem.domain.CourseExample;
import com.grad.why.studentsystem.domain.current.CurrentCourse;
import com.grad.why.studentsystem.domain.current.CurrentCourseDistributeInfos;
import com.grad.why.studentsystem.service.impl.CustomMultiThreadingService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CourseMapper {
    int countByExample(CourseExample example);

    int deleteByExample(CourseExample example);

    int deleteByPrimaryKey(Integer courseid);

    int insert(Course record);

    int insertSelective(Course record);

    List<Course> selectByExample(CourseExample example);

    Course selectByPrimaryKey(Integer courseid);

    int updateByExampleSelective(@Param("record") Course record, @Param("example") CourseExample example);

    int updateByExample(@Param("record") Course record, @Param("example") CourseExample example);

    int updateByPrimaryKeySelective(Course record);

    int updateByPrimaryKey(Course record);


    List<CurrentCourse> getCourseList(@Param("offset") int offset, @Param("limit") int limit, @Param("search") String search);

    long getCourseListLength(@Param("search") String search);

    int getMaxCourseId();

    int getCourseInfoByCourseName(@Param("coursename") String coursename);

    List<Course> getCourseInfos();


    String getCourseStateByCid(@Param("cid") int cid);

    List<Course> getCourseInfosBySid(@Param("sid") int sid);

    List<Course> getCourseInfosByRunning();

    List<Course> getRunningCourse(@Param("thisweek") int thisweek);

    List<Course> getShouldUpdateCourseList(@Param("thisweek") int thisWeek);

    List<Course> getshouldUpdateCourseListOfNoStartList(@Param("thisweek") int thisWeek);

    List<Course> getRunningCourseInfoByThisWeek(@Param("thisweek") int thisweek);

    List<Course> getshouldUpdateCourseInfoOfChangeNoStart(@Param("thisweek") int thisWeek);

    List<CurrentCourseDistributeInfos> getAllCourseDistrubuteInfo();
}